@use "../variables";
@use "../mixins";

html {
  scroll-behavior: smooth;
}

.wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;

  .header,
  .footer {
    flex-shrink: 0;
  }

  main {
    flex-grow: 1;
  }
}

.visually-hidden {
  @include mixins.visually-hidden;
}

.scroll-lock-ios {
  position: fixed;
  overflow: hidden;
}

.scroll-lock {
  overflow: hidden;
}

.no-scrollbar {
  -ms-overflow-style: none;

  &::-webkit-scrollbar {
    display: none;
  }
}

.no-transition {
  transition: none !important;
}

.js-focus-visible :focus:not(.focus-visible) {
  outline: none;
}

.reset-default {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

.page-link {
  text-decoration: none;
  color: variables.$color-default-white;
}

.hidden-max-desktop {
  @media (max-width: variables.$vp-max-tablet) {
    display: none;
  }
}

.hidden-min-desktop {
  @media (min-width: variables.$vp-1024) {
    display: none;
  }
}

.hidden-max-tablet {
  @media (max-width: variables.$vp-max-mobile) {
    display: none;
  }
}

.hidden-min-tablet {
  @media (min-width: variables.$vp-768) {
    display: none;
  }
}

// Accordion
@media (max-width: variables.$vp-max-mobile) {
  [data-accordion-item].is-open {
    [data-accordion-button]::before {
      display: none;
    }
  }

  [data-accordion-item]:not(.is-open) {
    [data-accordion-content] {
      display: none;
    }
  }
}

// Для блока about со скрываемым текстом
[data-expandable]:not(.is-expanded) [data-expandable-item] {
  display: none;
}

[data-expandable].is-expanded [data-expandable-button-folded] {
  display: none;
}

[data-expandable]:not(.is-expanded) [data-expandable-button-expanded] {
  display: none;
}
